package it.etoken.component.market.dao.mapper;

import it.etoken.base.model.market.entity.EosElector;
import it.etoken.base.model.market.entity.EosElectorExample;
import it.etoken.component.market.dao.provider.EosElectorSqlProvider;

import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

@Mapper
public interface EosElectorMapper {

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table eos_elector
	 * @mbg.generated  Mon Jun 11 16:58:24 CST 2018
	 */
	@SelectProvider(type = EosElectorSqlProvider.class, method = "countByExample")
	long countByExample(EosElectorExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table eos_elector
	 * @mbg.generated  Mon Jun 11 16:58:24 CST 2018
	 */
	@DeleteProvider(type = EosElectorSqlProvider.class, method = "deleteByExample")
	int deleteByExample(EosElectorExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table eos_elector
	 * @mbg.generated  Mon Jun 11 16:58:24 CST 2018
	 */
	@Delete({ "delete from eos_elector", "where id = #{id,jdbcType=BIGINT}" })
	int deleteByPrimaryKey(Long id);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table eos_elector
	 * @mbg.generated  Mon Jun 11 16:58:24 CST 2018
	 */
	@Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
	@Insert({ "insert into eos_elector (name, ", "account, icon, region, ", "url, createdate, ",
			"modifydate, deleted, ", "introduce)", "values (#{name,jdbcType=VARCHAR}, ",
			"#{account,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR}, #{region,jdbcType=VARCHAR}, ",
			"#{url,jdbcType=VARCHAR}, #{createdate,jdbcType=TIMESTAMP}, ",
			"#{modifydate,jdbcType=TIMESTAMP}, #{deleted,jdbcType=INTEGER}, ", "#{introduce,jdbcType=LONGVARCHAR})" })
	int insert(EosElector record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table eos_elector
	 * @mbg.generated  Mon Jun 11 16:58:24 CST 2018
	 */
	@InsertProvider(type = EosElectorSqlProvider.class, method = "insertSelective")
	int insertSelective(EosElector record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table eos_elector
	 * @mbg.generated  Mon Jun 11 16:58:24 CST 2018
	 */
	@SelectProvider(type = EosElectorSqlProvider.class, method = "selectByExampleWithBLOBs")
	@Results({ @Result(column = "id", property = "id", jdbcType = JdbcType.BIGINT, id = true),
			@Result(column = "name", property = "name", jdbcType = JdbcType.VARCHAR),
			@Result(column = "account", property = "account", jdbcType = JdbcType.VARCHAR),
			@Result(column = "icon", property = "icon", jdbcType = JdbcType.VARCHAR),
			@Result(column = "region", property = "region", jdbcType = JdbcType.VARCHAR),
			@Result(column = "url", property = "url", jdbcType = JdbcType.VARCHAR),
			@Result(column = "createdate", property = "createdate", jdbcType = JdbcType.TIMESTAMP),
			@Result(column = "modifydate", property = "modifydate", jdbcType = JdbcType.TIMESTAMP),
			@Result(column = "deleted", property = "deleted", jdbcType = JdbcType.INTEGER),
			@Result(column = "introduce", property = "introduce", jdbcType = JdbcType.LONGVARCHAR) })
	List<EosElector> selectByExampleWithBLOBs(EosElectorExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table eos_elector
	 * @mbg.generated  Mon Jun 11 16:58:24 CST 2018
	 */
	@SelectProvider(type = EosElectorSqlProvider.class, method = "selectByExample")
	@Results({ @Result(column = "id", property = "id", jdbcType = JdbcType.BIGINT, id = true),
			@Result(column = "name", property = "name", jdbcType = JdbcType.VARCHAR),
			@Result(column = "account", property = "account", jdbcType = JdbcType.VARCHAR),
			@Result(column = "icon", property = "icon", jdbcType = JdbcType.VARCHAR),
			@Result(column = "region", property = "region", jdbcType = JdbcType.VARCHAR),
			@Result(column = "url", property = "url", jdbcType = JdbcType.VARCHAR),
			@Result(column = "createdate", property = "createdate", jdbcType = JdbcType.TIMESTAMP),
			@Result(column = "modifydate", property = "modifydate", jdbcType = JdbcType.TIMESTAMP),
			@Result(column = "deleted", property = "deleted", jdbcType = JdbcType.INTEGER) })
	List<EosElector> selectByExample(EosElectorExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table eos_elector
	 * @mbg.generated  Mon Jun 11 16:58:24 CST 2018
	 */
	@Select({ "select", "id, name, account, icon, region, url, createdate, modifydate, deleted, introduce",
			"from eos_elector", "where id = #{id,jdbcType=BIGINT}" })
	@Results({ @Result(column = "id", property = "id", jdbcType = JdbcType.BIGINT, id = true),
			@Result(column = "name", property = "name", jdbcType = JdbcType.VARCHAR),
			@Result(column = "account", property = "account", jdbcType = JdbcType.VARCHAR),
			@Result(column = "icon", property = "icon", jdbcType = JdbcType.VARCHAR),
			@Result(column = "region", property = "region", jdbcType = JdbcType.VARCHAR),
			@Result(column = "url", property = "url", jdbcType = JdbcType.VARCHAR),
			@Result(column = "createdate", property = "createdate", jdbcType = JdbcType.TIMESTAMP),
			@Result(column = "modifydate", property = "modifydate", jdbcType = JdbcType.TIMESTAMP),
			@Result(column = "deleted", property = "deleted", jdbcType = JdbcType.INTEGER),
			@Result(column = "introduce", property = "introduce", jdbcType = JdbcType.LONGVARCHAR) })
	EosElector selectByPrimaryKey(Long id);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table eos_elector
	 * @mbg.generated  Mon Jun 11 16:58:24 CST 2018
	 */
	@UpdateProvider(type = EosElectorSqlProvider.class, method = "updateByExampleSelective")
	int updateByExampleSelective(@Param("record") EosElector record, @Param("example") EosElectorExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table eos_elector
	 * @mbg.generated  Mon Jun 11 16:58:24 CST 2018
	 */
	@UpdateProvider(type = EosElectorSqlProvider.class, method = "updateByExampleWithBLOBs")
	int updateByExampleWithBLOBs(@Param("record") EosElector record, @Param("example") EosElectorExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table eos_elector
	 * @mbg.generated  Mon Jun 11 16:58:24 CST 2018
	 */
	@UpdateProvider(type = EosElectorSqlProvider.class, method = "updateByExample")
	int updateByExample(@Param("record") EosElector record, @Param("example") EosElectorExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table eos_elector
	 * @mbg.generated  Mon Jun 11 16:58:24 CST 2018
	 */
	@UpdateProvider(type = EosElectorSqlProvider.class, method = "updateByPrimaryKeySelective")
	int updateByPrimaryKeySelective(EosElector record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table eos_elector
	 * @mbg.generated  Mon Jun 11 16:58:24 CST 2018
	 */
	@Update({ "update eos_elector", "set name = #{name,jdbcType=VARCHAR},", "account = #{account,jdbcType=VARCHAR},",
			"icon = #{icon,jdbcType=VARCHAR},", "region = #{region,jdbcType=VARCHAR},",
			"url = #{url,jdbcType=VARCHAR},", "createdate = #{createdate,jdbcType=TIMESTAMP},",
			"modifydate = #{modifydate,jdbcType=TIMESTAMP},", "deleted = #{deleted,jdbcType=INTEGER},",
			"introduce = #{introduce,jdbcType=LONGVARCHAR}", "where id = #{id,jdbcType=BIGINT}" })
	int updateByPrimaryKeyWithBLOBs(EosElector record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table eos_elector
	 * @mbg.generated  Mon Jun 11 16:58:24 CST 2018
	 */
	@Update({ "update eos_elector", "set name = #{name,jdbcType=VARCHAR},", "account = #{account,jdbcType=VARCHAR},",
			"icon = #{icon,jdbcType=VARCHAR},", "region = #{region,jdbcType=VARCHAR},",
			"url = #{url,jdbcType=VARCHAR},", "createdate = #{createdate,jdbcType=TIMESTAMP},",
			"modifydate = #{modifydate,jdbcType=TIMESTAMP},", "deleted = #{deleted,jdbcType=INTEGER}",
			"where id = #{id,jdbcType=BIGINT}" })
	int updateByPrimaryKey(EosElector record);
}